package com.example.crm.mapper;

import com.example.crm.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zz
 * @since 2024-06-06
 */
public interface RoleMapper extends BaseMapper<Role> {
    /**
     * 查询角色权限
     */
    Role selectRolePermission(@Param("roleId") Long roleId);

    @Delete("update sys_role set role_flag = 0 where role_id = #{roleId}")
    boolean del(Long roleId);
}
